package cn.dankal.lequ.ui.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import java.util.ArrayList;
import java.util.List;

import butterknife.Bind;
import butterknife.ButterKnife;
import cn.dankal.lequ.R;
import cn.dankal.lequ.commom.adapter.BaseAdapter.ViewHolder;
import cn.dankal.lequ.commom.adapter.BaseAdapter.recyclerview.CommonAdapter;

public class FirstGameActivity extends AppCompatActivity {
    @Bind(R.id.recyclerview)
    RecyclerView recyclerview;

    LinearLayoutManager linearLayoutManager;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_first_game);
        ButterKnife.bind(this);
        initRecyclerView();
    }

    private void initRecyclerView() {
        linearLayoutManager = new LinearLayoutManager(this);
        recyclerview.setLayoutManager(linearLayoutManager);
        recyclerview.setHasFixedSize(true);

        List<Integer> mDatas = new ArrayList<>();
        mDatas.add(1);
        mDatas.add(2);
        mDatas.add(3);
        mDatas.add(4);
        mDatas.add(5);
        mDatas.add(6);
        mDatas.add(7);
        mDatas.add(8);
        mDatas.add(9);
        mDatas.add(10);
        mDatas.add(11);
        recyclerview.setAdapter(new CommonAdapter(this, R.layout.item_currency_game, mDatas) {
            @Override
            public void convert(ViewHolder holder, Object o) {
            }

            @Override
            public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {

            }
        });
    }
}
